package leetcode;

import java.util.ArrayList;
import java.util.List;

import org.junit.Test;

/**
 * @author LiDong
 * @version 1.0.0
 * @createTime 2022/1/18 8:33
 */
public class Test2114 {


    @Test
    public void test() {

        String[] str = new String[2];
        str[0] = "I am a Boy";
        str[1] = "I am a Boy";

        System.out.println(mostWordsFound(str));
    }

    public int mostWordsFound(String[] sentences) {
        int max = 0;
        for (String sentence : sentences) {
            String[] s = sentence.split(" ");
            if (s.length > max) {
                max = s.length;
            }
        }
        return max;
    }
}
